package com.leo.chapter02;

import com.leo.anno.NotThreadSafe;

/**
 *
 * @author xuexiaolei
 * @version 2017年10月13日
 */
@NotThreadSafe
public class LazyInitRace {
    private ExpensiveObject instance = null;

    public ExpensiveObject getInstance() {
        if (instance == null)
            instance = new ExpensiveObject();
        return instance;
    }
}
